//
//  DataBaseTools.h
//  MemoryTravel
//
//  Created by dllo on 15/12/26.
//  Copyright © 2015年 fcx. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ExperienceModel.h"

@interface DataBaseTools : NSObject

#pragma mark - 把字符串转换成字典的方法
+ (NSString *)GetStringFromDictionary:(NSMutableDictionary *)dic;

#pragma mark - 把字典转换正字符串的方法
+ (NSMutableDictionary *)GetDictionaryFromString:(NSString *)string;

+ (instancetype)shareDataBase;
- (void)openDB;

#pragma mark - 用户账号密码信息
- (void)createMessage;
- (void)insertMessageWithUserName:(NSString *)userName password:(NSString *)password;
- (NSMutableDictionary *)selectMessage;

#pragma mark - 选择城市界面存储城市信息
- (void)createCityChooseTbale;
- (void)insertHotCitiesWithArray:(NSMutableArray *)hotArray;
- (void)insertAllCitiesWithArray:(NSMutableArray *)allArray;
- (NSMutableArray *)selectCityArrayWithType:(NSString *)type;
- (void)dropCityChooseTable;

#pragma mark - 收藏经历
- (void)createExperienceTable;
- (void)insertExperienceWithModel:(ExperienceModel *)model;
- (void)deleteExperienceWithId:(NSString *)product_id;
- (NSMutableArray *)selectExperience;

@end
